package com.netty.esc.common.enums;

/**
 * @author: ext.zhaoyang17
 * @date: 2022.11.18
 */
public enum RelationShipEnum {

    //查询当前在线用户状态
    FRIEND("friend",Direction.ONE),
    BLACKLIST("blacklist", Direction.TWO),
    ;


    private final String value;
    private final Direction direction;

    RelationShipEnum(String value, Direction direction){
        this.value = value;
        this.direction = direction;
    }


    public String getType() {
        return value;
    }
    public int getEdge(){
        return direction.getEdge();
    }

    //单向关系还是双向关系
    private enum Direction{
        ONE(1),
        TWO(2);
        private final int edge;

        Direction(int edge) {
            this.edge = edge;
        }
        public int getEdge(){return edge;}
    }
}
